-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Smart submit mode #110
base: master
Are you sure you want to change the base?
Smart submit mode #110
Conversation
@olszowski can you rebase to solve the conflicts ? |
mcpartools/mcengine/fluka.py
Outdated
@@ -1,5 +1,6 @@ | |||
import logging | |||
import os | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please avoid whitespace changes
Codecov Report
@@ Coverage Diff @@
## master #110 +/- ##
==========================================
+ Coverage 63.82% 65.67% +1.85%
==========================================
Files 12 13 +1
Lines 868 976 +108
==========================================
+ Hits 554 641 +87
- Misses 314 335 +21
Continue to review full report at Codecov.
|
@@ -11,5 +11,6 @@ def __init__(self, options_content): | |||
JobScheduler.__init__(self, options_content) | |||
|
|||
submit_script_template = os.path.join('data', 'submit_slurm.sh') | |||
smart_submit_script_template = os.path.join('data', 'smart_submit_slurm.sh.j2') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why .j2
suffix ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a jinja2 template, I wanted this to be explicit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok
mcpartools/scheduler/smart/slurm.py
Outdated
node_ids = [] | ||
for node in nodes_sorted: | ||
count = int(round(node.cpu_idle * ratio)) | ||
from itertools import repeat |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why doing import
inside the loop ?
move import outside the loop
mcpartools/scheduler/smart/slurm.py
Outdated
def get_cluster_state_from_os(): | ||
from subprocess import check_output, STDOUT | ||
from shlex import split | ||
command = "sinfo --states='idle,mixed' --partition=plgrid --format='%n %P %O %T %C'" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why plgrid
partition is hardcoded ?
Two things:
|
Work in progress, although main concept is present. Has some bugs, need to spend a little bit more time on it.